package com.example.smartcity.Mappers;

import com.example.smartcity.Entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

public interface UserMapper {
    // 用户相关的方法
    User getUserByUserNameAndPassword(@Param("username") String username, @Param("password") String password);
    User getUserByUserName(@Param("username") String username);
    User getUserByEmail(@Param("email") String email);
    Boolean addUser(@Param("nickname") String nickname,@Param("email") String email,@Param("username") String username,@Param("password") String password,@Param("sexual") int sexual);
    User getUserByUid(@Param("uid") int uid);
    String getUserAvatarById(@Param("uid") int uid);
    void updateUserByUid(Map<String, Object> params);
    void updateUserAvatarByUid(@Param("uid") int uid, @Param("avatar") String avatar);
    void updateUserPasswordByUid(Map<String, Object> params);
}
